package com.changxianggu.cloud.crawler.core.modules.storage.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.time.LocalDate;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 
 * </p>
 *
 * @author liuyuantao
 * @since 2020-04-26
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("cxg_pdf_info")
public class CxgPdfInfo extends Model<CxgPdfInfo> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 目录名称
     */
    @TableField("title")
    private String title;

    /**
     * 页码
     */
    @TableField("page")
    private Integer page;

    /**
     * pdf转图片的base64
     */
    @TableField("img_base64")
    private String imgBase64;

    /**
     * pdf ID
     */
    @TableField("book_id")
    private Integer bookId;

    @TableField("create_time")
    private LocalDate createTime;

    @TableField("update_time")
    private LocalDate updateTime;


    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
